package com.xihuanjun.sdk.entity;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.xihuanjun.sdk.annotation.UniqueKey;
import com.xihuanjun.sdk.enums.DraftType;
import com.xihuanjun.sdk.enums.SapSLMethod;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * Copyright (C), 2024-08-24
 * FileName: BaseEntiry
 * Author:   溪浣君
 * Date:     2024-08-24 11:40
 * Description:
 */
@Data
@NoArgsConstructor
@ToString
@JsonAutoDetect(fieldVisibility= JsonAutoDetect.Visibility.ANY,getterVisibility= JsonAutoDetect.Visibility.NONE)
public class BaseEntity {

    /**
     * 营销单据主键
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long DocEntry;


    /**
     * 凭证主键
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long JdtNum;


    /**
     * 收款主键
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long DocNum;


    /**
     * 物料主数据主键
     */
    @UniqueKey(value = {SapSLMethod.Items})
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String ItemCode;


    /**
     * 业务伙伴主数据主键
     */
    @UniqueKey(value = {SapSLMethod.BusinessPartners})
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String CardCode;

    /**
     * 生产工单主键
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long AbsoluteEntry;

    /**
     * 员工主数据主键
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Long EmployeeID;


    /**
     * 草稿类型
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private DraftType DocObjectCode;
}
